package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class IntervalValueExpressionSubtype implements IntervalValueExpression {

    private int beginIndex;
    private int endIndex;
    private DatetimeValueExpression datetimeValueExpression;
    private DatetimeTerm datetimeTerm;
    private IntervalQualifier intervalQualifier;

    public IntervalValueExpressionSubtype(int beginIndex,
                                          DatetimeValueExpression datetimeValueExpression,
                                          DatetimeTerm datetimeTerm,
                                          IntervalQualifier intervalQualifier) {
        this.beginIndex = beginIndex;
        this.endIndex = intervalQualifier.getEndIndex();
        this.datetimeValueExpression = datetimeValueExpression;
        this.datetimeTerm = datetimeTerm;
        this.intervalQualifier = intervalQualifier;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public DatetimeValueExpression getDatetimeValueExpression() {
        return datetimeValueExpression;
    }

    public DatetimeTerm getDatetimeTerm() {
        return datetimeTerm;
    }

    public IntervalQualifier getIntervalQualifier() {
        return intervalQualifier;
    }

}
